<template>
  <view class="container">
    <!-- 汇总卡片 -->
    <view class="summary-card">
      <view class="summary-item">
        <text>总人数</text>
        <text class="value">15</text>
        <view class="info">💎 单量：0</view>
      </view>
      <view class="summary-item">
        <text>总额</text>
        <text class="value">0</text>
        <view class="info">🛍️ 购物：0</view>
      </view>
    </view>

    <!-- 推荐列表 -->
    <view class="recommend-list">
      <block v-for="(item, index) in recommendList" :key="index">
        <view class="recommend-card">
          <!-- 用户信息 -->
          <view class="user-info">
            <view class="avatar"></view>
            <view class="user-text">
              <text class="name">{{ item.name }}</text>
              <text class="id">ID: {{ item.id }}</text>
              <text class="tel">TEL: {{ item.tel }}</text>
            </view>
            <view class="buttons">
              <view class="button purple">蜜粉</view>
              <view class="button purple-outline">甄选星推官</view>
            </view>
          </view>

          <!-- 数据详情 -->
          <view class="user-details">
            <view class="total">总 {{ item.total }}</view>
            <view class="details-row">
              <view>
                <text>单量：</text>
                <text>蜜巢 {{ item.honeyComb }}</text>
                <text>蜜罐 {{ item.honeyPot }}</text>
              </view>
              <view>
                <text>购物：</text>
                <text>蜜巢 {{ item.shopComb }}</text>
                <text>蜜罐 {{ item.shopPot }}</text>
              </view>
            </view>
          </view>
        </view>
      </block>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      recommendList: [
        {
          name: "周于皓3",
          id: "mz826812",
          tel: "18502311101",
          total: 0,
          honeyComb: 0,
          honeyPot: 0,
          shopComb: 0,
          shopPot: 0,
        },
        {
          name: "王飞",
          id: "mz826813",
          tel: "18523190308",
          total: 0,
          honeyComb: 0,
          honeyPot: 0,
          shopComb: 0,
          shopPot: 0,
        },
        {
          name: "段小涛",
          id: "mz826814",
          tel: "18523190309",
          total: 0,
          honeyComb: 0,
          honeyPot: 0,
          shopComb: 0,
          shopPot: 0,
        },
      ],
    };
  },
};
</script>

<style scoped>
/* 页面容器 */
.container {
  background-color: #f5f5f5;
  min-height: 100vh;
}

/* 头部 */
.header {
  background-color: #fff;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.title {
  font-size: 18px;
  font-weight: bold;
}

/* 汇总卡片 */
.summary-card {
  background-color: #7e57c2;
  border-radius: 12px;
  margin: 10px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  color: #fff;
}

.summary-item {
  text-align: center;
}

.value {
  font-size: 24px;
  font-weight: bold;
  margin: 5px 0;
}

.info {
  font-size: 14px;
}

/* 推荐列表 */
.recommend-list {
  margin: 10px;
}

.recommend-card {
  background-color: #fff;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.avatar {
  width: 50px;
  height: 50px;
  background-color: #ddd;
  border-radius: 50%;
}

.user-text {
  flex: 1;
  margin-left: 10px;
}

.name {
  font-size: 16px;
  font-weight: bold;
  display: block;
}

.id,
.tel {
  font-size: 14px;
  color: #666;
  display: block;
}

.buttons {
  display: flex;
  flex-direction: column;
}

.button {
  text-align: center;
  font-size: 14px;
  margin-bottom: 5px;
  padding: 5px 10px;
  border-radius: 12px;
}

.purple {
  background-color: #7e57c2;
  color: #fff;
}

.purple-outline {
  border: 1px solid #7e57c2;
  color: #7e57c2;
  background-color: transparent;
}

.user-details {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.total {
  font-size: 16px;
  color: #7e57c2;
  margin-bottom: 5px;
}

.details-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #666;
}
</style>
